<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #father #son {
            color: blue;
        }

        #father p.c2{
            color: black;
        }

        div.c1 p.c2 {
            color: red;
        }

        #father {
            color: green !important;
        }

        #f{
            color: red;
        }

        .pp{
            color: blue;
        }
    </style>
</head>

<body>
    <div id="father" class="c1">
        <p id="son" class="c2">
            请问这行字体是什么颜色
        </p>
    </div>

    <div id="f">
        <p class="pp">这行字体什么颜色</p>
    </div>
</body>

</html>